<template>
  <div class="check_details_container">
    <my-header class="page_header" ref="header" :isBack="true" :backText="showTurn ? '点巡检转办' : ''" :centerTitleText="showTurn ? '' : '点巡检任务详情'" :is_Level_three_page="true" :hadInput="false" @backFn="back"></my-header>
    <div class="deviceInfo">
      <div class="info_list">
        <ul class="info">
          <li>
            <p class="title" style="font-size: 18px;">巡检对象:</p>
            <p class="titleContent" style="font-size: 18px;">{{ detailsData.departmentName | LastdepFn }}<span v-if="detailsData.deviceName">/</span>{{ detailsData.deviceName }}<span v-if="detailsData.componentName">/</span>{{ detailsData.componentName }}</p>
          </li>
          <li>
            <p class="title">巡检类型:</p>
            <p class="titleContent">{{ type }}</p>
          </li>

          <!-- <li v-show="!detailsData.recordIsExecute">
            <p class="title">负&nbsp;&nbsp;责&nbsp;&nbsp;人:</p>
            <p class="titleContent person">
              <span
                v-for="(items, index) in detailsData.leaderList"
                :key="index"
                ><span v-if="index !== 0">,</span>{{ items.name }}</span
              >
            </p>
          </li> -->
          <li>
            <p class="title">识别打卡:</p>
            <p class="titleContent">
              {{ detailsData.icCardClockPeriod == 0 ? '否' : '是' }}
            </p>
          </li>
          <li>
            <p class="title">打卡时间:</p>
            <p class="titleContent">
              {{ !detailsData.validityDate ? '0' : detailsData.validityDate }}
              分钟
            </p>
          </li>
          <li v-if="detailsData.status === 9">
            <p class="title">逾期时间:</p>
            <p class="titleContent" v-if="detailsData.endTime">
              {{ detailsData.endTime | formaDateH }}点
              <span class="body-item-state" v-if="detailsData.shift">{{ detailsData.shift }}</span>
            </p>
          </li>
          <li v-else>
            <p class="title">时间范围:</p>
            <p class="titleContent" v-if="detailsData.startTime && detailsData.endTime">{{ detailsData.startTime | formaDateH }}点&nbsp;-&nbsp;{{ detailsData.endTime | formaDateH }}点</p>
          </li>
          <li>
            <p class="title">执行标准:</p>
            <p class="titleContent">{{ detailsData.checkContent }}</p>
          </li>
          <li>
            <p class="title">状&emsp;&emsp;态:</p>
            <p class="titleContent">
              <!-- {{detailsData.status | statusText}} -->
              {{ switchStatus(detailsData.checkSubmitTime || detailsData.overdueDisposeTime, detailsData.startTime, detailsData.endTime) }}
            </p>
          </li>
        </ul>
      </div>

      <div class="execute_box" v-if="!isExecute">
        <p class="time">
          <span class="val" v-if="detailsData.status == 3"> 剩余时间： {{ detailsData.surplusTime }} </span>
          <span class="val" v-if="detailsData.status == 5"> 逾期时间： {{ detailsData.surplusTime }} </span>
          <span class="val" v-if="detailsData.status == 4">
            时间：
            {{ detailsData.startTime | formaDateH }}
            点&nbsp;至&nbsp;
            {{ detailsData.endTime | formaDateH }}点
          </span>
        </p>
        <div class="btn_box" v-if="hasAuth(detailsData.checkLeaderIds)">
          <button class="btn_1" :class="[isActive2 == 1 ? 'active' : '', waitExecute ? 'addwidth removemargin' : '']" @click="chooseTransfer">
            转办
          </button>
          <button v-show="!overdueExecute" :disabled="buttonExecute(detailsData.icCardClockPeriod, detailsData.clockStatus)" :class="[isActive3 == 1 ? 'active' : '', overdueExecute ? 'yellow' : '', detailsData.icCardClockPeriod && detailsData.icCardClockPeriod != 0 && detailsData.clockStatus == 0 ? 'btn_disabled' : 'btn_2']" @click="addCheck" v-if="!waitExecute">
            {{ detailsData.icCardClockPeriod && detailsData.icCardClockPeriod != 0 && detailsData.clockStatus == 0 ? '未打卡' : '执行' }}
          </button>
          <button v-show="overdueExecute" class="btn_2" :class="[isActive3 == 1 ? 'active' : '', overdueExecute ? 'yellow' : '']" @click="addCheck" v-if="!waitExecute">
            逾期执行
          </button>
          <!-- <button
          :disabled="detailsData.isClock == 1 && (detailsData.clockStatus == 0 || detailsData.clockStatus == 2) && overdueExecute ? 'disabled' : 'false' "
          :class="[isActive3 == 1?'active':'', overdueExecute ? 'yellow':'',detailsData.isClock == 1 && (detailsData.clockStatus == 0 || detailsData.clockStatus == 2) ? 'btn_disabled':'btn_2']"
          @click="addCheck" v-if="!waitExecute">{{overdueExecute ? '逾期执行' : '执行'}}</button> -->
        </div>
      </div>

      <div class="info_list hasExecute" v-if="hasExecute">
        <ul class="info">
          <li v-if="detailsData.overdueLeaderUserName">
            <p class="title">责&nbsp;&nbsp;任&nbsp;&nbsp;人:</p>
            <p class="titleContent">{{ detailsData.overdueLeaderUserName }}</p>
          </li>
          <li v-if="detailsData.overdueDisposeUserName">
            <p class="title">处&nbsp;&nbsp;理&nbsp;&nbsp;人:</p>
            <p class="titleContent">{{ detailsData.overdueDisposeUserName }}</p>
          </li>
          <li v-if="detailsData.operatorName">
            <p class="title">执&nbsp;&nbsp;行&nbsp;&nbsp;人:</p>
            <p class="titleContent">{{ detailsData.operatorName }}</p>
          </li>
          <li v-if="detailsData.checkSubmitTime">
            <p class="title">提交时间:</p>
            <p class="titleContent">
              {{ detailsData.checkSubmitTime | formaDateHms }}
            </p>
          </li>
          <li v-else-if="detailsData.overdueDisposeTime">
            <p class="title">处理时间:</p>
            <p class="titleContent">
              {{ detailsData.overdueDisposeTime | formaDateHms }}
            </p>
          </li>
          <li v-if="detailsData.checkResult">
            <p class="title">巡检结果:</p>
            <p class="titleContent">
              {{ switchRes(detailsData.checkResult) }}
              <span v-if="detailsData.exceptionResult" style="color:#ff2c2c">
                (部件逾期未更换)
              </span>
            </p>
          </li>
          <li v-if="detailsData.overdueDisposeReson">
            <p class="title">逾期原因:</p>
            <p class="titleContent">{{ detailsData.overdueDisposeReson }}</p>
          </li>
          <li v-if="detailsData.workSheet">
            <p class="title">关联工单:</p>
            <p class="titleContent" style="color:#456DE6" @click="toWorkSheetNo(detailsData.workSheet.id)">{{ detailsData.workSheet.sn }}</p>
          </li>
          <li>
            <p class="title">处理描述:</p>
            <p class="titleContent">{{ detailsData.checkSubmitContent || detailsData.overdueDisposeDesc }}</p>
          </li>
          <li class="img_box" v-if="detailsData.pictureList && detailsData.pictureList.length !== 0">
            <div v-for="(item, index) in detailsData.pictureList" :key="index">
              <img :src="item.url" @click="show(index)" class="previewer-demo-img" />
            </div>
            <div v-transfer-dom>
              <previewer :list="preImgList" ref="previewer" :options="options" @on-index-change="logIndexChange"></previewer>
            </div>
          </li>
        </ul>
      </div>

      <!-- <div
        class="deviceContent"
        ref="deviceContent"
        v-if="hasExecute && detailsData.workSheet"
      >
        <div class="info_list work_sheet">
          <ul class="info">
            <li>
              <p class="title">工单描述:</p>
              <p class="titleContent">
                {{ detailsData.workSheet.description }}
              </p>
            </li>
            <li>
              <p class="title">优&nbsp;&nbsp;先&nbsp;&nbsp;级:</p>
              <p class="titleContent">
                {{ switchLevel(detailsData.workSheet.workSheetPriority) }}
              </p>
            </li>
          </ul>
        </div>

        <div
          class="timeLine"
          v-for="(item, index) in workSheetDetail"
          :key="index"
        >
          <div :class="index == 0 ? 'groupImg' : 'groupImg1'">
            <div class="imgBorder">
              <p class="borderSty" v-if="index == workSheetDetail.length - 1">
                提交
              </p>
              <iconSvg
                name="geren"
                w="22px"
                h="22px"
                class="geren"
                v-else-if="item.handleType != 3 && index == 0"
              ></iconSvg>
              <p class="borderSty" v-else-if="item.handleType == 1">上报</p>
              <p class="borderSty" v-else-if="item.handleType == 2">转办</p>
              <p class="borderSty" v-else-if="item.handleType == 3">解决</p>
              <p class="borderSty" v-else-if="item.handleType == 4">驳回</p>
            </div>
            <iconSvg
              class="arrow_top"
              v-if="index != workSheetDetail.length - 1 && index == 0"
              name="arrow1"
              w="15px"
              h="15px"
            ></iconSvg>
            <iconSvg
              class="arrow_top"
              v-else-if="index != workSheetDetail.length - 1"
              name="arrow2"
              w="15px"
              h="15px"
            ></iconSvg>
            <div
              class="arrowLine"
              v-if="index != workSheetDetail.length - 1 && index == 0"
            ></div>
            <div
              class="arrowLine solid"
              v-else-if="index != workSheetDetail.length - 1"
            ></div>
          </div>
          <div class="timemiddle">
            <div class="workOrder_header_title">
              <div class="name_box" v-if="item.handleType != 3 && index == 0">
                {{ item.operatorName }}
              </div>
              <div class="name_box" v-else>{{ item.actOperatorName }}</div>
            </div>
            <div
              class="workOrder_content"
              :class="index == 0 && item.handleType !== 3 ? 'mrt15' : ''"
            >
              <div v-if="index == 0 && item.handleType !== 3">
                <p class="time_wrapper">{{ item.createTime | formatDate }}</p>
              </div>
              <div v-else>
                <div
                  @click="
                    goCommentDetails(
                      item.id,
                      item.workSheetCommentsDTOS.length !== 0
                    )
                  "
                >
                  <p v-if="index !== workSheetDetail.length - 1" class="desc">
                    {{ item.description }}
                  </p>
                  <div
                    class="comment_reply"
                    v-if="item.workSheetCommentsDTOS.length !== 0"
                  >
                    <p
                      v-for="(commentItem,
                      commentIndex) in item.workSheetCommentsDTOS"
                      :key="commentIndex"
                    >
                      {{ commentItem.commenterName }}：{{
                        commentItem.description
                      }}
                    </p>
                  </div>
                </div>
                <p class="time_wrapper">{{ item.createTime | formatDate }}</p>
              </div>
            </div>
          </div>
        </div>
      </div> -->
    </div>
    <div class="my_dialog" :style="{ top: headerHeight + 'px' }">
      <transition name="slide">
        <div v-show="showTurn">
          <div v-if="refreshcomponents">
            <select-person :offsetTop="headerHeight" selectTitle="选择转办人" :turnCheckId="turnCheckId" :workSheetType="turnType" @closeSelectPersonFn="closeTurnFn" @resetUpScroll="refresh"></select-person>
          </div>
        </div>
      </transition>
    </div>
  </div>
</template>

<script>
import myHeader from '@/components/common/header';
import selectPerson from '@/components/common/select/selectPerson';
import { Previewer, TransferDom } from 'vux';
export default {
  directives: {
    TransferDom,
  },
  components: {
    myHeader,
    selectPerson,
    Previewer,
  },
  data() {
    return {
      hasExecute: false,
      isExecute: true, // 这样写是为了解决一进来未执行显示时间的模块闪烁消失体验
      waitExecute: false,
      overdueExecute: false,
      showTurn: false,
      refreshcomponents: false,
      remainTime: '',
      headerHeight: '',
      turnCheckId: '',
      turnType: '',
      userId: '',
      isActive2: -1,
      isActive3: -1,
      detailsData: {},
      workSheetDetail: [],
      preImgList: [],
      options: {
        getThumbBoundsFn(index) {
          let thumbnail = document.querySelectorAll('.previewer-demo-img')[index];
          let pageYScroll = window.pageYOffset || document.documentElement.scrollTop;
          let rect = thumbnail.getBoundingClientRect();
          return { x: rect.left, y: rect.top + pageYScroll, w: rect.width };
        },
      },
    };
  },
  computed: {
    type() {
      if (this.$route.query.cate && this.$route.query.cate == 'componentRecord') {
        return '部件';
      } else if (this.$route.query.cate && this.$route.query.cate == 'deviceRecord') {
        return '设备';
      } else if (this.$route.query.cate && this.$route.query.cate == 'departmentRecord') {
        return '部门';
      } else {
        return '-';
      }
    },
    deviceId() {
      if (this.$route.query.deviceId) {
        return parseInt(this.$route.query.deviceId);
      } else {
        return null;
      }
    },
    componentId() {
      if (this.$route.query.componentId) {
        return parseInt(this.$route.query.componentId);
      } else {
        return null;
      }
    },
    departmentId() {
      if (this.$route.query.departmentId) {
        return parseInt(this.$route.query.departmentId);
      } else {
        return null;
      }
    },
  },
  beforeRouteEnter(to, from, next) {
    next((vm) => {
      vm.isActive2 = -1;
      vm.isActive3 = -1;
      if (from.path == '/operaionManage/addCheck') {
        vm.getRouterData();
      }
    });
  },
  filters: {
    statusText() {
      return '';
    },
  },
  mounted() {
    this.headerHeight = this.$refs.header.$el.offsetHeight;
    // 获取userId
    this.$http(this.$API.getUserInfo, {}, true).then((res) => {
      this.userId = res.id;
      this.getRouterData();
    });
  },
  methods: {
    //判断执行按钮是否可以点击
    buttonExecute(isClock, status) {
      if (isClock && isClock != 0 && status == 0) {
        return true;
      }
      return false;
    },
    //判断权限
    hasAuth(checkLeaderIds) {
      if (checkLeaderIds) {
        return checkLeaderIds.split(',').includes(this.userId);
      }
    },
    back() {
      if (this.showTurn) {
        this.showTurn = false;
      } else {
        history.back(-1);
      }
    },
    toWorkSheetNo(id) {
      this.$router.push({
        name: 'workOrderDetails',
        query: {
          id,
        },
      });
    },
    // 转办
    chooseTransfer() {
      let type = '';
      if (this.detailsData.checkType === 1) {
        type = 'department';
      } else if (this.detailsData.checkType === 2) {
        type = 'device';
      } else {
        type = 'component';
      }
      this.isActive2 = 1;
      setTimeout(() => {
        this.isActive2 = -1;
      }, 200);
      this.showTurnFn(Number(this.detailsData.id), type);
    },
    // 添加设备点巡检
    addCheck() {
      this.isActive3 = 1;
      setTimeout(() => {
        this.$router.push({
          path: `/operaionManage/addCheck`,
          query: {
            id: this.detailsData.id,
            deviceId: this.type !== '部门' ? this.deviceId : '',
            componentId: this.type == '部件' ? this.componentId : '',
            departmentId: this.departmentId,
            sheetType: 1, //工单类型 1： 点巡检工单 2：更换工单
            type: this.type == '部门' ? 1 : this.type == '设备' ? 2 : this.type == '部件' ? 3 : '',
          },
        });
      }, 200);
    },
    showTurnFn(checkId, type) {
      this.showTurn = true;
      this.refreshcomponents = true;
      this.turnCheckId = parseInt(checkId);
      this.turnType = type;
    },
    refresh() {
      history.back(-1);
    },
    closeTurnFn() {
      this.showTurn = false;
    },
    switchRes(n) {
      switch (n) {
        case 1:
          return '正常';
          break;
        case 2:
          return '轻微故障';
          break;
        case 3:
          return '中度故障';
          break;
        case 4:
          return '重度故障';
          break;
        default:
          return '-';
          break;
      }
    },
    switchLevel(n) {
      switch (n) {
        case 1:
          return '一般';
          break;
        case 2:
          return '重要';
          break;
        case 3:
          return '紧急';
          break;
        default:
          return '-';
          break;
      }
    },
    switchStatus(operatorTime, startTime, endTime) {
      let currentTime = new Date().getTime();
      if (operatorTime) {
        this.hasExecute = true;
        this.isExecute = true;
        if (operatorTime > endTime) {
          return '逾期已处理';
        } else {
          return '已执行';
        }
      } else {
        this.hasExecute = false;
        this.isExecute = false;
        if (currentTime < startTime) {
          this.waitExecute = true;
          return '待执行';
        } else if (currentTime > startTime && currentTime < endTime) {
          //判断是否是自己的任务
          if (this.hasAuth(this.detailsData.checkLeaderIds)) {
            return '可执行';
          } else {
            return '执行中';
          }
        } else if (currentTime > endTime) {
          this.overdueExecute = true;
          return '已逾期';
        }
      }
    },
    getRouterData() {
      var param = {};
      this.CheckInfo = this.$route.query;
      //获取点巡检记录详情
      this.checkRecordId = this.CheckInfo.id;
      if (this.CheckInfo.cate == 'componentRecord') {
        param = {
          id: this.checkRecordId,
          type: 1,
        };
      } else if (this.CheckInfo.cate == 'deviceRecord') {
        param = {
          id: this.checkRecordId,
          type: 0,
        };
      } else if (this.CheckInfo.cate == 'departmentRecord') {
        param = {
          id: this.checkRecordId,
          type: 0,
        };
      }
      this.getWorkSheet(this.checkRecordId, param.type ? param.type : this.CheckInfo.type);
      this.$httpGet(this.$API.getcheckTaskdetail, { id: this.checkRecordId }, true).then((res) => {
        this.detailsData = res;
        this.preImgList = [];
        if (this.detailsData.pictureList) {
          this.detailsData.pictureList.forEach((item) => {
            this.preImgList.push({
              src: item.url,
              msrc: item.url,
            });
          });
        }
        let currentTime = new Date().getTime();
      });
    },
    getWorkSheet: function(id, type) {
      this.$http(this.$API.getCheckWorkSheet, { checkId: id, type: type }, true).then((data) => {
        this.workSheetDetail = data;
      });
    },
    goCommentDetails(workSheetHandleId, length) {
      if (!length) {
        return;
      }
      this.$router.push({
        path: '/commentDetails',
        query: { workSheetHandleId: workSheetHandleId, type: 2 },
      });
    },
    logIndexChange(arg) {},
    show(index) {
      this.$refs.previewer.show(index);
    },
  },
};
</script>

<style lang="less" scoped>
.btn_disabled {
  background: #7e7f94 !important;
  border: 1px solid #7e7f94 !important;
}
.check_details_container {
  min-height: 100%;
  background: #22233f;
  .page_header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
  }
  .my_dialog {
    position: fixed;
    width: 100%;
    left: 0;
    z-index: 4999;
  }
  .deviceInfo {
    height: 100vh;
    padding: 46px 0 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    .info_list {
      margin: 13px 16px;
      background: #22233f;
      &.hasExecute {
        .info {
          padding-bottom: 15px;
        }
      }
      &.work_sheet {
        margin-top: 0;
        margin-bottom: 20px;
        .info {
          padding: 0;
        }
      }
      .info {
        line-height: 0.7rem;
        font-size: 16px;
        padding: 8px 16px;
        background: #292a4d;
        li {
          line-height: 30px;
          position: relative;
          display: flex;
          .openOrHide {
            overflow: hidden;
          }
          .toggle {
            position: absolute;
            top: 50%;
            right: 0;
            transform: translate(0, -50%);
            color: rgba(255, 255, 255, 0.5);
            .text {
              font-size: 12px;
            }
          }
          .title {
            width: 80px;
            color: rgba(255, 255, 255, 0.5);
            font-size: 16px;
            margin-right: 15px;
            /* text-align: justify;
              text-align-last: justify; */
          }
          .titleContent {
            flex: 1;
            font-size: 16px;
            color: #fff;
            word-wrap: break-word;
            white-space: normal;
            word-break: break-all;
            .person {
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
            .body-item-state {
              margin-left: 8px;
              padding: 0 4px 2px;
              color: #456de6;
              border: 1px solid #456de6;
              border-radius: 2px;
            }
          }
          &.img_box {
            padding-left: 80px;
            div {
              margin: 0 5px;
              width: 54px;
              height: 54px;
            }
          }
        }
      }
    }
    .execute_box {
      padding: 20px 0;
      text-align: center;
      background: #292a4d;
      margin-top: 12px;
      .time {
        font-size: 17px;
        color: rgba(255, 255, 255, 0.5);
        .val {
          color: #fff;
        }
      }
      .btn_box {
        margin-top: 20px;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        button {
          display: inline-block;
          padding: 1px 47px;
          border: none;
          outline: none;
          font-size: 12px;
          background: rgba(69, 109, 230, 0.8);
          border: 1px solid rgba(69, 109, 230, 1);
          border-radius: 2px;
          color: #fff;
          &.btn_1 {
            margin-right: 12px;
            &.addwidth {
              padding: 1px 77px;
            }
            &.active {
              background: rgba(110, 146, 255, 1);
            }
            &.removemargin {
              margin-right: 0;
            }
          }
          &.btn_2 {
            align-self: flex-end;
            &.yellow {
              background: #dd9710;
              border: 1px solid #dd9710;
              color: #fff;
              padding: 1px 35px;
              &.active {
                border: 1px solid #ebb44b;
                background: #ebb44b;
              }
            }
            &.active {
              border: 1px solid rgba(69, 109, 230, 1);
              background: rgba(110, 146, 255, 1);
            }
          }
        }
      }
    }
    .check_desc,
    .workSheet_desc {
      margin-top: 12px;
      background: #292a4d;
      .title {
        font-size: 17px;
        color: rgba(255, 255, 255, 0.5);
        padding: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }
      .content {
        padding: 8px;
        display: flex;
        box-sizing: border-box;
        .text_content {
          flex: 1;
          font-size: 14px;
          color: #fff;
        }
        .toggle_btn {
          width: 50px;
          .text_btn {
            font-size: 14px;
            color: #fff;
          }
        }
      }
    }
  }
}

.timeLine {
  display: flex;
  color: #fff;
  position: relative;
  margin-top: 10px;
  margin-bottom: 10px;
  .arrow_top {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translate(-50%, 0);
  }
  .arrowLine {
    display: inline-block;
    position: absolute;
    top: 48px;
    left: 50%;
    border-left: 2px dashed rgb(69, 109, 230);
    height: 85%;
    transform: translate(-50%, 0);
    &.solid {
      border-left: 2px solid rgb(44, 56, 110);
    }
  }
}
.timeleft {
  width: 20%;
}
.groupImg {
  width: 40px;
  text-align: center;
  position: relative;
  top: -5px;
  .imgBorder {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 4em;
    background: #456de6ff;
    line-height: 35px;
    text-align: center;
    .geren {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
    .borderSty {
      color: #fff;
      font-size: 12px;
      position: relative;
      line-height: 40px;
    }
  }
}

.groupImg1 {
  width: 40px;
  text-align: center;
  position: relative;
  top: -5px;
  .imgBorder {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 4em;
    background: #2c386eff;
    line-height: 35px;
    text-align: center;
    &::before {
      position: absolute;
      content: '';
      width: 6px;
      height: 6px;
      background: #292a4d;
      top: -6px;
      left: 50%;
      transform: translate(-50%, 0);
    }
    .borderSty {
      color: #fff;
      font-size: 12px;
      position: relative;
      line-height: 40px;
    }
  }
}
.timemiddle {
  flex: 3;
  margin-left: 8px;
  position: relative;
  top: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  .workOrder_header_title {
    font-size: 14px;
    overflow: hidden;
    .name_box {
      width: 75%;
      float: left;
      text-align: left;
    }
    .status {
      width: 25%;
      float: right;
      text-align: right;
      color: #456de6;
    }
  }
  .workOrder_content {
    word-break: break-all;
    margin-top: 5px;
    font-size: 16px;
    &.mrt15 {
      margin-top: 15px;
    }
    .desc {
      font-size: 12px;
    }
  }
  .comment_reply {
    margin-top: 5px;
    padding: 10px;
    border-radius: 2px;
    background: #1f203b;
    p {
      font-size: 13px;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
    }
  }
  .time_wrapper {
    font-size: 12px;
    padding: 5px 0;
    color: rgba(255, 255, 255, 0.5);
  }
}

.timeImg {
  width: 25px;
  height: 25px;
  position: absolute;
  left: 29%;
}
.deviceContent {
  padding: 10px 13px 2px;
  box-sizing: border-box;
  background: #292a4d;
  margin-top: 13px;
}
.deviceContent .timeLine:last-child .timemiddle {
  border: none;
}

.slide-enter-active,
.slide-leave-active {
  transition: all 0.5s ease;
}
.slide-enter,
.slide-leave-to {
  transform: translateY(-800px);
  opacity: 0;
}
</style>
